package com.xneure.enging.ui.element.grid;

import java.util.ArrayList;
import java.util.List;

import com.xneure.enging.ui.UiElement;

public class UiGrid extends UiElement {

	public UiGrid(UiElement par) {
		super(par);
		setProperty("class", "grid");
	}

	public void addRow(UiGridRow row) {
		addElement(row);
	}

	public List<UiGridRow> getRows() {
		List<UiElement> elems = getChildren();
		List<UiGridRow> list = new ArrayList<UiGridRow>(elems.size());
		for (UiElement ctl : elems) {
			list.add((UiGridRow) ctl);
		}
		return list;
	}

}
